import request from '@/utils/request'

//获取-分页查询角色列表
export function getRolesRequest (params) {
  // return request.get('/sys/role',{
  //   params
  // })
  return request({
    url: '/sys/role',
    method: 'get',
    params: params
  })
}
//新增-角色
export function addRolesRequest (data) {
  return request.post('/sys/role', data)
}
//删除-角色
export function delRolesRequest (id) {
  return request.delete(`/sys/role/${id}`)
}

//修改-角色
export function updateRolesRequest (data) {
  return request.put(`/sys/role/${data.id}`,data)
}

//分配权限-角色
export function assignPremRequest (data) {
  return request.put(`/sys/role/assignPrem`,data)
}

//获取-角色详情
export function getRolesListRequest (id) {
  return request.get(`/sys/role/${id}`)
}